//
//  ShareManger.h
//  Weibbo
//
//  Created by 李 林刚 on 13-8-11.
//  Copyright (c) 2013年 Omnivores. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "SinaWeiboSDK.h"


#pragma mark - QQ 空间 /*QQ互联  http://connect.qq.com/manage/index*/

#define APPID_QQ @"100501627"

#pragma mark - 新浪微博   /*API文档   http://open.weibo.com/wiki/微博API#.E5.85.B3.E7.B3.BB*/
#define   SINA_App_Key          @"3131278037"//微博开放平台上申请第三方应用时分配的app_key
#define   SINA_App_Secret      @"9a37062e09a1311d1c41c103d0e364dc"//微博开放平台上申请第三方应用时分配的app_secret
#define   RedirectURL       @"http://sns.whalecloud.com/sina2/callback"


typedef NS_ENUM(NSInteger, ShareType) {
    ShareTypeTencentOAuth = 1,
    ShareTypeSina = 2,
};

@protocol ShareMangerDelegate <NSObject>
@optional

-(void)ShareMangerShareType:(ShareType)type DidLoginIn:(BOOL)IsLogin;

-(void)ShareMangerDidCancelShareType:(ShareType)type;

-(void)ShareMangerShareType:(ShareType)type DidLoginOut:(BOOL)IsOut;

-(void)ShareMangerShareType:(ShareType)type DidShareMessage:(BOOL)IsSuccess;

@end


@interface ShareManger : NSObject<SinaWeiboDelegate>

@property (nonatomic, assign)id<ShareMangerDelegate> delegate;

+(ShareManger *)SharedInstance;
#pragma mark - 判断是否绑定
-(BOOL)IsBind:(ShareType)shareType;

#pragma mark - 绑定
-(void)LogInWithLogInType:(ShareType)type;

#pragma mark - 解除绑定
-(void)LoginOut:(ShareType)type;

#pragma mark - ShareMessage

//第一个为title  第二个为UIImage
-(void)ShareMessageTitle:(NSString *)title  ShareImage:(UIImage *)image ImageURL:(NSString *)url  ShareType:(int)type;
@end
